import { BasicApi, BasicQueryParams, BasicResult } from '../basic';
import { ChoiceFieldResult } from '../sys/choice';

enum URL {
  Patient = '/console/patient',
}

interface PatientQueryParams extends BasicQueryParams {
  code: string;
  name: string;
}

interface PatientResult extends BasicResult {
  code: string;
  name: string;
  age: string;
  gender: ChoiceFieldResult;
  phone: string;
  clinical_diagnosis: string;
  medication_history: string;
}

export const patientApi = new BasicApi<PatientQueryParams, PatientResult>(URL.Patient);
